package com.ruoyi.pdf.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.pdf.mapper.BusinessPdfMapper;
import com.ruoyi.pdf.domain.BusinessPdf;
import com.ruoyi.pdf.service.IBusinessPdfService;
import com.ruoyi.common.core.text.Convert;

/**
 * pdf的增删改查Service业务层处理
 * 
 * @author anjie
 * @date 2020-06-01
 */
@Service
public class BusinessPdfServiceImpl implements IBusinessPdfService 
{
    @Autowired
    private BusinessPdfMapper businessPdfMapper;

    /**
     * 查询pdf的增删改查
     * 
     * @param id pdf的增删改查ID
     * @return pdf的增删改查
     */
    @Override
    public BusinessPdf selectBusinessPdfById(Long id)
    {
        return businessPdfMapper.selectBusinessPdfById(id);
    }

    /**
     * 查询pdf的增删改查列表
     * 
     * @param businessPdf pdf的增删改查
     * @return pdf的增删改查
     */
    @Override
    public List<BusinessPdf> selectBusinessPdfList(BusinessPdf businessPdf)
    {
        return businessPdfMapper.selectBusinessPdfList(businessPdf);
    }

    /**
     * 新增pdf的增删改查
     * 
     * @param businessPdf pdf的增删改查
     * @return 结果
     */
    @Override
    public int insertBusinessPdf(BusinessPdf businessPdf)
    {
        businessPdf.setCreateTime(DateUtils.getNowDate());
        return businessPdfMapper.insertBusinessPdf(businessPdf);
    }

    /**
     * 修改pdf的增删改查
     * 
     * @param businessPdf pdf的增删改查
     * @return 结果
     */
    @Override
    public int updateBusinessPdf(BusinessPdf businessPdf)
    {
        businessPdf.setUpdateTime(DateUtils.getNowDate());
        return businessPdfMapper.updateBusinessPdf(businessPdf);
    }

    /**
     * 删除pdf的增删改查对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteBusinessPdfByIds(String ids)
    {
        return businessPdfMapper.deleteBusinessPdfByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除pdf的增删改查信息
     * 
     * @param id pdf的增删改查ID
     * @return 结果
     */
    @Override
    public int deleteBusinessPdfById(Long id)
    {
        return businessPdfMapper.deleteBusinessPdfById(id);
    }
}
